package com.yanwq.sayhi.repository;

import com.yanwq.sayhi.bean.Article;
import com.yanwq.sayhi.bean.ArticleAttitude;
import com.yanwq.sayhi.bean.User;
import org.hibernate.annotations.SQLInsert;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

/**
 * 作者：yanweiqiang。
 * 日期：2016/8/4 0004。
 */
@Repository
public interface ArticleAttitudeRepo extends CrudRepository<ArticleAttitude, Long> {
    ArticleAttitude findByArticleAndUser(Article article, User user);

    int countByArticleAndType(Article article, int type);
}
